package com.ace.user.common.bean.dto;

import com.ace.user.common.constant.Group;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;

/**
 * @author weihl
 * @date 2019/10/11 12:05
 */
@Data
@Accessors(chain = true)
@NoArgsConstructor
public class UserDTO implements Serializable {

    @NotNull(message = "{userDTO.id}",groups = {Group.Delete.class,Group.Logout.class})
    private Integer id;

    @NotNull(message = "{userDTO.appId}",groups = {Group.Delete.class,Group.Add.class,Group.Login.class})
    private String appId;
    /**
     * 用户名
     */
    @NotNull(message = "{userDTO.name}",groups = {Group.Add.class,Group.Login.class})
    private String name;


    /**
     * 用户名称
     */
    @NotNull(message = "{userDTO.fullName}",groups = {Group.Add.class})
    private String fullName;

    /**
     * 用户密码
     */
    @NotNull(message = "{userDTO.password}",groups = {Group.Add.class,Group.Login.class})
    private String password;

    /**
     * 描述
     */
    private String description;

    /**
     * 创建时间
     */
    private Date createTime;

    /**
     * 更新时间
     */
    private Date updateTime;

    /**
     * 创建人
     */
    private String createUser;

    /**
     * 最后修改人
     */
    private String updateUser;

    /**
     * 是否删除  0：正常， -1：已删除
     */
    private Integer deleteFlag;


    /**
     * 类型（1：web，2：androd）
     */
    @NotNull(message = "{userDTO.type}",groups = {Group.Login.class})
    private String type;

    /**
     * mqtt消息关联标识
     */
    private String connectNum;


    private String token;

}
